package ocrsTest;


import junit.framework.TestCase;

import ocrs.Location;

import org.junit.After;
import org.junit.Before;

public class LocationTest extends TestCase{

	Location test,test2;
	
	@Before
	public void setUp() throws Exception {
		test = new Location();
		test2 = new Location("CAMPUS","BUILDING",0);
	}

	@After
	public void tearDown() throws Exception {
		test = null;
	}
	
	public void testDefaultLocationConstruct() {
		assertTrue(test!=null); //created properly
	}
	
	public void testSpecificConstruct() {
		assertTrue(test2.toString().equals("Campus Site:   CAMPUS" + "\n" +
											"Building Name: BUILDING" + "\n" +
											"Room Number:   0" + "\n\n"));
	}
	
	public void testSetters() {
		test.setCampusSite("UMBC");
		test.setBuildingName("TEST BUILDING");
		test.setRoomNumber(10);
		assertTrue(test.toString().equals("Campus Site:   UMBC" + "\n" +
											"Building Name: TEST BUILDING" + "\n" +
											"Room Number:   10" + "\n\n"));	
	}

}
